import request from '@/utils/request'

export function getExpenseList(params) {
  return request({
    url: '/platformExpenseList',
    params
  })
}

export function getIncomeList(params) {
  return request({
    url: '/platformIncomeList',
    params
  })
}

export function delIncomeData(uid) {
  return request({
    url: `/platformIncomeList/${uid}`,
    method: 'DELETE'
  })
}

export function addIncomeData(data) {
  return request({
    url: '/platformIncomeList',
    method: 'POST',
    data
  })
}

export function editIncomeData(data) {
  return request({
    url: `/platformIncomeList/${data.id}`,
    method: 'PATCH',
    data
  })
}

export function queryIncomeData(params) {
  return request({
    url: '/platformIncomeList',
    params
  })
}

export function delExpenseData(uid) {
  return request({
    url: `/platformExpenseList/${uid}`,
    method: 'DELETE'
  })
}

export function addExpenseData(data) {
  return request({
    url: '/platformExpenseList',
    data,
    method: 'POST'
  })
}

export function editExpenseData(data) {
  return request({
    url: `/platformExpenseList/${data.id}`,
    data,
    method: 'PATCH'
  })
}

export function queryExpenseData(params) {
  return request({
    url: '/platformExpenseList',
    params
  })
}
// export function getTradeTypeList() {
//   return request({
//     url: '/tradeTypeList'
//   })
// }

// export function getShopNameList() {
//   return request({
//     url: '/shopNameList'
//   })
// }

// export function getUserNameList() {
//   return request({
//     url: '/userNameList'
//   })
// }
